package com.tagit;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

/**
 * 
 * This class creates the login form
 * This login was build using the information from:
 * http://developer.android.com/resources/tutorials/views/hello-formstuff.html
 *
 */

public class TagIt extends Activity {
    
    EditText etUsername;
    EditText etPassword;
    Button btLogin;
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        View user = findViewById(R.id.username);
        etUsername = (EditText) user;
        etPassword = (EditText) findViewById(R.id.password);
        btLogin = (Button) findViewById(R.id.login);
        
        //On click do something, which is go to the Gallery activity
        btLogin.setOnClickListener(new View.OnClickListener() {			

			public void onClick(View v) {
				// This intent starts the activity of the Photo Gallery
				
        		Intent intent = new Intent(TagIt.this, PhotoGallery.class);	
        		startActivity(intent);
			}
		});
        
    }
}